package com.java2207.group1.service.impl;

import com.java2207.group1.common.LayuiUserVo;
import com.java2207.group1.mapper.UserMapper;
import com.java2207.group1.pojo.User;
import com.java2207.group1.service.UserService;
import com.sun.org.apache.bcel.internal.generic.NEW;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Lenovo 2022/7/27 12:15
 */
@Service("userService")
public class UserServiceImpl implements UserService {

    @Autowired
    UserMapper userMapper;

    @Override
    public LayuiUserVo login(User user) {
        User currentUser = userMapper.login(user);
        LayuiUserVo layuiUserVo = new LayuiUserVo();
        layuiUserVo.setCode(0);
        layuiUserVo.setData(currentUser);
        return layuiUserVo;
    }
}
